.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background-color: var(--dark-bg);
  border: 1px solid var(--border-color-dark);
  border-radius: 8px;
  padding: 0 15px;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.input-wrapper input {
  padding-right: 35px;
  width: 100%;
  padding: 12px 0;
  border: none;
  background: transparent;
  outline: none;
  color: var(--text-color-dark);
  font-size: 1rem;
}
.toggle-password {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #a0aec0;
  display: flex;
  align-items: center;
}
.login-container.light-theme .toggle-password {
  color: #718096;
}
:root {
  --primary-color: #007bff;
  --primary-hover-color: #0056b3;
  --dark-bg: #1a202c;
  --dark-bg-secondary: #2d3748;
  --text-color-dark: #e2e8f0;
  --text-color-light: #4a5568;
  --border-color-dark: #4a5568;
  --border-color-light: #cbd5e0;
}
.login-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  font-family: 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
  background-color: var(--dark-bg-secondary);
  color: var(--text-color-dark);
}
.login-container.light-theme {
  background-color: #f7fafc;
  color: var(--text-color-light);
}
.login-container.light-theme .login-left {
  background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
  color: white;
}
.login-container.light-theme .login-right {
  background-color: #ffffff;
}
.login-container.light-theme .form-title {
  color: #2d3748;
}
.login-container.light-theme .input-wrapper input,
.login-container.light-theme .input-wrapper {
  background-color: #edf2f7;
  color: #2d3748;
  border-color: var(--border-color-light);
}
.login-container.light-theme .input-wrapper input::placeholder {
  color: #a0aec0;
}
.login-container.light-theme .input-wrapper svg:first-child {
  color: #718096;
}
.login-container.light-theme .login-button {
  background-color: #3182ce;
}
.login-container.light-theme .login-button:hover {
  background-color: #2b6cb0;
}
.login-left {
  width: 55%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background:
    linear-gradient(rgba(26, 32, 44, 0.8), rgba(26, 32, 44, 0.8)),
    url('https://images.unsplash.com/photo-1593941707882-68282f10f845?q=80&w=2070&auto=format&fit=crop') no-repeat center center;
  background-size: cover;
  padding: 40px;
  text-align: center;
  transition: all 0.3s ease;
}
.left-content {
  max-width: 500px;
}
.system-logo {
  margin-bottom: 20px;
}
.system-logo svg {
  color: #fff;
}
.login-container.light-theme .system-logo svg {
  color: #fff;
}
.system-title {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: 2px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.system-subtitle {
  font-size: 1.2rem;
  font-weight: 300;
  color: #e2e8f0;
  letter-spacing: 1px;
}
.login-container.light-theme .system-subtitle {
  color: #e2e8f0;
}
.login-right {
  width: 45%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--dark-bg-secondary);
  transition: background-color 0.3s ease;
}
.login-form-wrapper {
  width: 100%;
  max-width: 400px;
  padding: 40px;
}
.form-title {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 30px;
  text-align: center;
  color: var(--text-color-dark);
}
.form-item {
  margin-bottom: 25px;
}
.form-item label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: #a0aec0;
}
.login-container.light-theme .form-item label {
  color: #718096;
}
.input-wrapper:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}
.login-container.light-theme .input-wrapper:focus-within {
  box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.25);
}
.input-wrapper svg:first-child {
  color: #718096;
  margin-right: 10px;
}
.input-wrapper input::placeholder {
  color: #718096;
}
.error-message {
  color: #e53e3e;
  background-color: rgba(229, 62, 62, 0.1);
  border: 1px solid #e53e3e;
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  text-align: center;
}
.login-button {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 8px;
  background-color: var(--primary-color);
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.1s;
  display: flex;
  justify-content: center;
  align-items: center;
}
.login-button:hover:not(:disabled) {
  background-color: var(--primary-hover-color);
  transform: translateY(-2px);
}
.login-button:disabled {
  background-color: #555;
  cursor: not-allowed;
}
.loading-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (max-width: 1024px) {
  .login-left { width: 40%; }
  .login-right { width: 60%; }
  .system-title { font-size: 2.2rem; }
}
@media (max-width: 768px) {
  .login-container { flex-direction: column; }
  .login-left { width: 100%; height: 40vh; min-height: 250px; padding: 20px; text-align: center; justify-content: center; }
  .login-right { width: 100%; height: 60vh; justify-content: flex-start; align-items: center; padding-top: 30px; }
  .login-form-wrapper { max-width: 350px; }
  .system-title { font-size: 2rem; }
}
